package com.foreverwin.jzymes.archive.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.archive.mapper.DataArchiveMapper;
import com.foreverwin.jzymes.archive.domain.DataArchive;
import com.foreverwin.jzymes.archive.service.IDataArchiveService;

/**
 * 数据归档 服务层实现
 * 
 * @author ervin
 * @date 2019-07-31
 */
@Service
public class DataArchiveServiceImpl implements IDataArchiveService
{
	@Autowired
	private DataArchiveMapper dataArchiveMapper;

	/**
     * 查询数据归档信息
     * 
     * @param tableName 数据归档ID
     * @return 数据归档信息
     */
    @Override
	public DataArchive selectDataArchiveById(String tableName)
	{
	    return dataArchiveMapper.selectDataArchiveById(tableName);
	}
	
	/**
     * 查询数据归档列表
     * 
     * @param dataArchive 数据归档信息
     * @return 数据归档集合
     */
	@Override
	public List<DataArchive> selectDataArchiveList(DataArchive dataArchive)
	{
	    return dataArchiveMapper.selectDataArchiveList(dataArchive);
	}
	
    /**
     * 新增数据归档
     * 
     * @param dataArchive 数据归档信息
     * @return 结果
     */
	@Override
	public int insertDataArchive(DataArchive dataArchive)
	{
	    return dataArchiveMapper.insertDataArchive(dataArchive);
	}
	
	/**
     * 修改数据归档
     * 
     * @param dataArchive 数据归档信息
     * @return 结果
     */
	@Override
	public int updateDataArchive(DataArchive dataArchive)
	{
	    return dataArchiveMapper.updateDataArchive(dataArchive);
	}

	/**
     * 删除数据归档对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDataArchiveByIds(String ids)
	{
		return dataArchiveMapper.deleteDataArchiveByIds(ids.split(","));
	}
	
}
